<template>
    <div>
        <h1>login</h1>
        <button @click="login">登录哇</button>
    </div>
</template>

<script setup>
import { useRouter } from "vue-router";
const router = useRouter();

const login = ()=>{
    localStorage.setItem('token','aaaa');
    router.push('/films');
}

</script>

